import React, {Component} from 'react'
export default class A extends  Component{
    state = {
        count:10,
        msg:'atguigu'
    }
    render(){
        let {count,msg} = this.state
        return (
            <>
                <h3>A组件</h3>
                <p>count: {count}</p>
                <p>msg: {msg}</p>
                <p><button onClick={()=>{
                    this.setState({
                        count: count + 1
                    })
                }}>count++</button></p>
            </>
        )
    }
}